package service;

import com.gexin.fastjson.JSON;
//抽出set、rm公共的方法和属性
public abstract class AbstractCommand implements Command{

    private CommandTypeEnum type;

    public AbstractCommand(CommandTypeEnum type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

    public CommandTypeEnum getType() {
        return type;
    }

    public void setType(CommandTypeEnum type) {
        this.type = type;
    }
}
